server:
  port: 8765

eureka:
  client:
    serviceUrl:
      defaultZone: http://localhost:8761/eureka
spring:
  application:
    name: gateway-service
  cloud:
    gateway:
      discovery:
        locator:
          enabled: true
          lower-case-service-id: true
      routes:
        - id: user
          uri: lb://user-service
          predicates:
            - Path=/user/**
          filters:
            - RewritePath=/user/(?<path>.*), /$\{path}

        - id: media
          uri: lb://media-service
          predicates:
            - Path=/media/**
          filters:
            - RewritePath=/media/(?<path>.*), /$\{path}


        - id: api-user
          uri: lb://user-service
          predicates:
            - Path=/api/user/**

        - id: api-auth
          uri: lb://user-service
          predicates:
            - Path=/api/auth/**

        - id: api-media
          uri: lb://media-service
          predicates:
            - Path=/api/media/**

springdoc:
  webjars:
    prefix: /media-accounting
  api-docs:
    enabled: true
  swagger-ui:
    enabled: true
    config-url: /v3/api-docs/swagger-config
    urls:
      - name: user
        url: /user/v3/api-docs
      - name: media
        url: /media/v3/api-docs
